package com.lx.onbording.vshe.testassignment.core.camel;

import org.apache.camel.Exchange;
import org.apache.camel.Processor;

import com.lx.onbording.vshe.testassignment.core.dto.Money;
import com.lx.onbording.vshe.testassignment.core.dto.OrderItemDTO;

public class ItemServiceResultProcessor implements Processor {

	@Override
	public void process(Exchange exchange) throws Exception {
		OrderItemDTO data = prepareSimpleData();
		exchange.getOut().setBody(data);
	}

	private OrderItemDTO prepareSimpleData() {
		
		OrderItemDTO itemDTO = new OrderItemDTO();
		itemDTO.setId(200L);
		itemDTO.setName("Product");
		itemDTO.setPrice(new Money());
		itemDTO.setProductId(100L);
		itemDTO.setQuantity(5);

		return itemDTO;
	}

}
